package com.huafeng.entity.openai;

import lombok.Data;

import java.util.List;

/**
 * @author 花风
 * @date 2023/4/12 22:15
 * @Description openAi响应
 */
@Data
public class Response {
    private Integer created;

    private Usage usage;

    private String model;

    private String id;

    //回答列表
    private List<ChoicesItem> choices;

    private String object;

    @Data
    public static class ChoicesItem{
        private String finishReason;

        private Integer index;

        private String text;

        private Integer logprobs;
    }

    @Data
    public static class Usage{
        private Integer completionTokens;

        private Integer prompTokens;

        private Integer totalTokens;
    }
}
